<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 13 是 enter键 别称-->
        <input type="text" @keyup.13="handleKeyUp">
        <input type="text" @keyup.enter='handleKeyUp' id="">
    </div>
</body>
<script src="https://cn.vuejs.org/js/vue.js"></script>
<script>
    let vm = new Vue({
        el:"#app",
        methods: {
            handleKeyUp:function(e){
                console.log("你现在按下的是:",e.key);
                console.log("正在保存中");
            }
        }
    });
</script>
</html>